package cn.ym.ymcc.feign;

import cn.ym.ymcc.doc.CourseDoc;
import cn.ym.ymcc.fallback.SearchServerFeignFallbackFactory;
import cn.ym.ymcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "service-search",fallbackFactory = SearchServerFeignFallbackFactory.class)
public interface SearchServerFeign {

    @PostMapping("/search/save")
    public JSONResult save(@RequestBody CourseDoc courseDoc);
}
